
{{--只接受images参数--}}

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        @foreach($images as $key=>$image)
            <li data-target="#carousel-example-generic" data-slide-to={{$key}} class={{$key==0?'active':''}}></li>
        @endforeach
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        @foreach( $images as $index=>$image)
            <div class="item {{$index==1?'active':''}}">
                <img class="center-block" src={{$image->water_mark}} alt="{{$image->description}}" id="carousel-image">
                <div class="carousel-caption">
                    {{$image->description}}
                </div>
            </div>
        @endforeach
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
</div>
